package tomsung.cloud.agdc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tomsung.cloud.agdc.bean.District;
import tomsung.cloud.agdc.dao.DistrictMapper;

@Service("DistrictService")
public class DistrictService {

	@Autowired
	DistrictMapper cityMapper;
	
	public int createDistrict(District record)
	{
		return cityMapper.insertSelective(record);
	}
	
	public int deleteDistrict(Integer id,Integer cityid)
	{
		return cityMapper.deleteByPrimaryKey(id, cityid);
	}
	
	public District selectDistrict(Integer id,Integer cityid)
	{
		return cityMapper.selectByPrimaryKey(id, cityid);
	}
	
	public int updateDistrict(District record)
	{
		return cityMapper.updateByPrimaryKey(record);
	}
}
